class Bag {
    constructor() {
        this.items = [];
    }
    add() {
        if (arguments.length != 1) {
            throw Error('only accept one argumeng');
        }
        this.items.push(arguments[0]);
    }
    isEmpty() {
        return !this.items.length;
    }
    size() {
        return this.items.length;
    }
}

module.exports = Bag;